program array_slice
    implicit none

    integer :: i
    integer :: array1(10)  ! 1D integer array of 10 elements

    array1 = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]  ! Array constructor
    array1 = [(i, i = 1, 10)]  ! Implied do loop constructor

    print *, array1(1:10:2)  ! Print out elements at odd indices
    print *, array1(10:1:-1)  ! Print an array in reverse
end program array_slice